﻿Public Class DocumentoNacionalIdentidad
    'declaramos las variables que necesito.
    Dim letra() As String = {"T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"}
    Public dni As Integer

    Public Function obtenerLetraDni() As String
        Return letra(dni Mod 23)
    End Function
    'creamos esta Propiedad para poder asignar desde fuera el dni y obtener la letra.
    Public Property miDni() As String
        Get
            Return dni
        End Get
        Set(ByVal value As String)
            dni = value
        End Set
    End Property

End Class
